Midterm Exam Study Guide
General Guidelines
The exam is taken from Chapters 1-4 of Big Java 4th Edition by Horstmann. The text should be the primary instrument of study to prepare for the exam. The PowerPoint slides should be regarded as a companion to rather than substitute for the text. The learning aids in each chapter and the resources in WileyPLUS are also useful in preparing for the exam.
Material from Java programming assignments and labs
Test Format (October 14, 2011 in CCT208)
Multiple Choice Questions (20 pts)
Short Answer Questions (40 points) - evaluate, compute, write Java statements,
what is the output?
Programming Problems (40 pts)
ACADEMIC OBJECTIVES
Specific Guidelines
Things you should know:
identify the parts of a simple Java program (Topic 1.5, pages 11 - 13)
Java comments (Topic 1.5, page 12, Special Topic 1.1, page 14)
kinds of programming errors (Topic 1.7, pages 18 - 19)
Rules for forming Java identifiers, determine if a programmer-defined Java identifier is valid, Java statements that declare and initialize variables (Topic 2.2, pages 36 - 38)
What accessor and mutator methods are (Topic 2.7, page 48)
What a reference is and what it contains when it does and does not refer to an object, What an alias is and how references can become aliases (Topic 2.10, pages 54 – 56, Topic 5.2.5, page 182)
know how applets differ from applications (Special Topic 2.2, pages 63 - 65)
know how RGB colors work and be able to identify primary colors based on their RGB value (Topic 2.13.4, page 67)
white space characters (space, tab, newline)
What access specifiers are and what they mean, what an instance variable is, how the declaration of a method is formed, what a return type is (Topics 3.1 and 3.3, pages 82 - 84, 86)
What constructors are, what distinguishing features constructors have, how the declaration of a constructor is formed, what a default constructor is, how many constructors a class can have (Topic 3.3, page 87 and class discussion)
What garbage collection is (Topic 3.7, page 101)
Java statements that define constants (Topic 4.2, pages 133 - 135)
evaluate expressions that use arithmetic operators, precedence of arithmetic operators and parentheses (Topic 4.3, pages 137 - 139)
How to use the methods abs, sqrt, and random in the Math class (Topics 4.3.4 and 4.3.5, pages 139 -141)
Java statements that use an explicit cast to force Java to assign an incompatible type (Topic 4.3.5, pages 140 - 142)
Java statements that use shortcut operators (Special Topic 4.3, page 145)
How to use the methods of the String class, Java statements that send output to the console screen including the use of string concatenation and escape sequences (Topic 4.5, pages 149-151)
escape sequences (\” for quote, \’ for apostrophe, \t for tab, \n for newline, \\ for backslash, Special Topic 4.4, pages 152 - 153)
the character set Java uses (Special Topic 4.5, pages 153 - 154)
know how to import the Scanner class and read Java statements that call the methods of the Scanner class (Topic 4.6, pages 155 - 157)
What a class is, what attributes and behaviors are and what defines them in a class, what the state of an object is (pages 160-161)
Plus these items discussed in class:
how many bits are in a byte (8) and the number of values that can be represented in a byte (256)
letter abbreviations for certain powers of 2 (K, M, G, T)
What’s special about the package java.lang (it doesn’t have to be imported) and example classes in that package (Math, Object, String, System, for example)
How to recognize a method call and identify the calling method, called method, and what type of value is returned by the called method (class discussion)
Terms: formal parameter (parameter coded in a method declaration (also known as a method header)), actual parameter also known as argument (coded when a method is called), calling method (method containing the method call), called method (method named in the method call)